The program might be using a deprecated API, such as NSCountWindows which can cause that os_log message to appear in the console.
Try compiling with -Wdeprecated-declarations enabled, and clean up the code that is using deprecated APIs.
Alternatively, in your lldb, you can set a breakpoint (lldb) b libsystem_trace.dylib``_os_log_error_impl (only one backtick; concession to the forum formatting) and when that gets hit you can look up the callstack to figure out what in your code triggered the os_log message.